class CreateLibraryDocuments < ActiveRecord::Migration
  def change
    create_table :library_documents do |t|
      t.primary_key :id
      t.integer :category_id
      t.string :isbn
      t.string :title
      t.text :summary
      t.string :author
      t.integer :view_count
      t.date :published_on
      t.datetime :in_store_on
      t.datetime :edited_on
      t.datetime :created_on
      t.integer :quantity, :default => 1
      t.integer :lend_count, :default => 0
      t.string :status, :default => '1'
      t.string :tags
      t.string :language, :default => 'vi'
      t.integer :revision, :default => 1
      t.integer :time_limit, :default => 10
      t.string :cover_image
    end
  end
end
